import { HttpClient } from 'gloam-http'
import { requestEvent } from './requestEvent'
const optaions = {
  headers: {
    'Content-Type': 'application/json;charset=UTF-8',
    serviceCode: 'athletics-services-web',
  },
  requestToken: {
    enable: true,
    aesKey: 'WdzH675478d6df4359987cf2f90c6d89',
    split: '-:WDZH:TIME:-',
  },
  event: requestEvent,
  webEnvelope: {
    enable: true,
  },
}
const http = new HttpClient({
  ...optaions,
  requestOptions: {
    apiUrl: import.meta.env.VITE_API_URL,
  },
})

const platformHttp = new HttpClient({
  ...optaions,
  requestOptions: {
    apiUrl: '/platform-gateway',
  },
})
export { http, platformHttp }
